﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="alone.aspx.cs" Inherits="UI.alone" %>
<%@ Import Namespace="Model" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta name="renderer" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <title>亿销客投放红包合作申请</title>
    <script src="system/js/jquery.min.js"></script>
    <script src="/js/md5.js?v=1"></script>
    <script src="/js/common.js?v=1"></script>
    <script src="https://res.wx.qq.com/open/libs/weuijs/1.0.0/weui.min.js"></script>
    <script src="/js/jquery-weui.js"></script>
    <link rel="stylesheet" href="//cdn.bootcss.com/weui/1.1.1/style/weui.min.css">
    <link rel="stylesheet" href="//cdn.bootcss.com/jquery-weui/1.0.1/css/jquery-weui.min.css">
    <link href="css/style.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        *{ padding:0; margin:0;}
        li{ list-style:none;}
        a{ text-decoration:none;}
        img{display:block;width:100%;}
    </style>
</head>
<body>
    <div class="alone">
        <div class="alonetop">
            <div class="logo"></div>
            <img src="img/bg1.png"/>
        </div>
        <div class="form">
            <h1>留言申请</h1>
            <div class="alonebox">
                <ul>
                    <li> 
                        <label><span>联系人</span></label>
                        <div>
                            <input id="name" type="text" name="name" value="" placeholder="请输入联系人姓名"/>
                        </div>
                    </li>
                    <li> 
                        <label><span>手机号</span></label>
                        <div>
                            <input id="mobile" type="text" name="mobile" value="" placeholder="请输入手机号"/>
                        </div>
                    </li>
                    <li> 
                        <label><span>所在城市</span></label>
                        <div>
                            <input id="city" type="text" name="city" value="" placeholder="请输入所在城市"/>
                        </div>
                    </li>
                    <li> 
                        <label><span>公司名称</span></label>
                        <div>
                            <input id="comname" type="text" name="comname" value="" placeholder="请输入公司名称"/>
                        </div>
                    </li>
                </ul>
                <button onclick="Save_Apply()">提交申请</button>
            </div>
            <div class="we">
                <h1>联系我们</h1>
                <div class="tel">
                    <div class="tel-wrp">
                        <div class="tel-contact">
                            <div>
                                <a href="tel:<%=agentinfo.Mobile %>">
                                <div class="list">
                                    <span style="background-image:url(img/dianhua.png);"></span>
                                    <p><%=agentinfo.Mobile %><br />(点击这里 , 拨号咨询)</p>
                                </div>
                                </a>
                                <div class="list">
                                    <span style="background-image:url(img/weixin1.png);"></span>
                                    <p><%=agentinfo.WeChat %></p>
                                </div>
                            </div>
                        </div>
                        <div class="ewm">
                            <span><img src="<%=agentinfo.QRCode %>" /></span>
                            <p>长按加微信咨询</p>
                        </div>
                    </div>
                    
                </div>
            </div>
            

        </div>
    </div>
    <script>
        function Save_Apply() {
            var name = $("#name").val();
            var mobile = $("#mobile").val();
            var city = $("#city").val();
            var comname = $("#comname").val();
            if (name.Trim() == "") {
                $.alert("请输入您的姓名");
                return;
            };
            if (mobile.Trim() == "") {
                $.alert("请输入您的手机号");
                return;
            };
            if (mobile.Trim().length!=11) {
                $.alert("手机号码不正确");
                return;
            };
            if (city.Trim() == "") {
                $.alert("请输入您所在的城市");
                return;
            };
            if (comname.Trim() == "") {
                $.alert("请输入您的公司名称");
                return;
            };
            var data = {};
            data.act = "Save_Apply";
            data.name = name;
            data.mobile = mobile;
            data.city = city;
            data.comname = comname;
            data.adminid=<%=agentinfo.AdminID %>;
            $.showLoading("正在提交...");
            Ajax.Post("/tools/API.ashx", data, function (r) {
                $.hideLoading();
                var json = $.parseJSON(r);
                if (json.state) {
                    $.alert("申请成功，请保持电话畅通，客服将很快与您联系");
                } else {
                    $.alert(json.msg);
                }
            });
        };
    </script>
</body>
</html>
